import { createSlice } from "@reduxjs/toolkit";

export const mainSlice = createSlice(
  {
        name: "main",
        initialState: {
          fixed: true,
          showSearch:false,
        },
        reducers: {
            changeHeaderCofiig(state, { payload })
            {
                state.fixed = payload;
            },
          changeShowSearch(state, { payload })
          {
            state.showSearch = payload;  
            console.log("showSearch:",state.showSearch)
          }
          
        }
  }
) 

export const { changeHeaderCofiig,changeShowSearch} = mainSlice.actions;
export default mainSlice.reducer;